﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SksApp
{
    public partial class SettingsMenu : BaseView
    {
        public enum Menu
        {
            KasaTanim, KasiyerTanim, KasaYetki, KasiyerYetki, MagazaTanim, EvrakTasarim, VergiTanim, OdemeTipi, UrunGroup,SistemAyarlari
        }
        public delegate void MessageHandler(Menu sender);
        public event MessageHandler MessageReceived;

        public SettingsMenu()
        {
            InitializeComponent();
            this.BackColor = Color.Transparent;
            this.Size = new Size(528, 398);
        }

        private void btnMouseDown(object sender, MouseEventArgs e)
        {
            PictureBox pc = sender as PictureBox;
            pc.BorderStyle = BorderStyle.Fixed3D;
        }
        private void btnMouseUp(object sender, MouseEventArgs e)
        {
            PictureBox pc = sender as PictureBox;
            pc.BorderStyle = BorderStyle.None;
        }

        private void btnKasaTanim_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.KasaTanim);
        }

        private void btnKasiyerTanim_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.KasiyerTanim);
        }

        private void btnKasaYetki_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.KasaYetki);
        }

        private void btnKasiyerYetki_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.KasiyerYetki);
        }

        private void picMagaza_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.MagazaTanim);
        }

        private void picEvrakTasarim_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.EvrakTasarim);
        }

        private void btnGeri_Click(object sender, EventArgs e)
        {
            this.Dispose();
            Event.Invoke(null, null);
        }

        private void btnVergiTanim_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.VergiTanim);
        }

        private void btnOdeme_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.OdemeTipi);
        }

        private void btnUrunGroup_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.UrunGroup);
        }

        private void btnAyar_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.SistemAyarlari);
        }

    }
}
